package ink.xiaobaibai.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author xiaobaibai
 * @since 2021-05-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("monthlyfee_order")
@NoArgsConstructor
public class MonthlyfeeOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    public MonthlyfeeOrder(String orderId, Integer userId, BigDecimal orderAmount, Integer trialDay, Integer extendedDay, Date expireTime, Integer deviceId, Integer adminUserId, Integer adminDepId, String status, Integer logisticsId) {
        this.orderId = orderId;
        this.userId = userId;
        this.orderAmount = orderAmount;
        this.trialDay = trialDay;
        this.extendedDay = extendedDay;
        this.expireTime = expireTime;
        this.deviceId = deviceId;
        this.adminUserId = adminUserId;
        this.adminDepId = adminDepId;
        this.status = status;
        this.logisticsId = logisticsId;
    }

    /**
     * 包月订单表主键
     */
    @TableId(value = "order_id")
    private String orderId;

    /**
     * 押金id
     */
    @TableField(value = "deposit_id")
    private String depositId;

    /**
     * 用户id
     */
    @TableField("user_id")
    private Integer userId;

    /**
     * 支付金额
     */
    @TableField("order_amount")
    private BigDecimal orderAmount;

    /**
     * 试用天数
     */
    @TableField("trial_day")
    private Integer trialDay;

    /**
     * 延长天数
     */
    @TableField("extended_day")
    private Integer extendedDay;

    /**
     * 过期时间
     */
    @TableField("expire_time")
    private Date expireTime;

    /**
     * 对应机器id
     */
    @TableField("device_id")
    private Integer deviceId;

    /**
     * 对应负责人id
     */
    @TableField("admin_user_id")
    private Integer adminUserId;

    /**
     * 对应部门id
     */
    @TableField("admin_dep_id")
    private Integer adminDepId;

    /**
     * 订单状态(未分配机器/未经理审核/未管理审核/客户未激活/使用中/申请退押金中/已完成)
     */
    @TableField("status")
    private String status;

    /**
     * 对应物流表id
     */
    @TableField("logistics_id")
    private Integer logisticsId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 押金退款金额
     */
    @TableField(exist = false)
    private BigDecimal returnAmount;

}
